package com.example.mobile2021606177cke0418;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class MainActivity extends AppCompatActivity {

    private TextView tvMainTitle;
    private RecyclerView rvMainSchools;
    private String[]schools={"深圳职业技术学院","顺德职业技术学院","广东科学职业技术学院","广东轻工职业技术学院","深圳信息职业技术学院","佛山职业技术学院","广东职业技术学院"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        rvMainSchools.setLayoutManager(new LinearLayoutManager(this));
        SchoolAdapter adapter=new SchoolAdapter(schools);
        rvMainSchools.setAdapter(adapter);
    }

    private void initView() {
        tvMainTitle = findViewById(R.id.tv_main_title);
        rvMainSchools = findViewById(R.id.rv_main_schools);
    }
}